package com.oyyh.lawyermanager.service;

import com.oyyh.lawyermanager.entity.Lawyer;
import com.oyyh.lawyermanager.mapper.LawyerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 律师管理业务service层接口实现类
 *
 * @author 欧阳远辉
 * @version 1.0
 */
@Service
public class LawyerServiceImpl implements LawyerService {
    @Autowired
    private LawyerMapper lawyerMapper;

    @Override
    public int addLawyer(Lawyer lawyer) {
        return lawyerMapper.insertLawyer(lawyer);
    }

    @Override
    public List<Lawyer> selectAllLawyer() {
        return lawyerMapper.selectAllLawyer();
    }

    @Override
    public int delLawyer(int lawyerId) {
        return lawyerMapper.delLawyer(lawyerId);
    }

    @Override
    public Lawyer selectLawyerById(int lawyerId) {
        return lawyerMapper.selectLawyerById(lawyerId);
    }

    @Override
    public int modifyLawyer(Lawyer lawyer) {
        return lawyerMapper.updateLawyer(lawyer);
    }
}
